import {request} from "@/network/request";

export function listManageVo(categoryId, allowComment, sort, order, likeTitle) {
  return request({
    url: '/article/listManageVo',
    method: 'post',
    data: {
      categoryId,
      allowComment,
      sort,
      order,
      likeTitle
    }
  })
}

//更改是否允许评论
export function updateArticleAllowComment(articleId, allowComment) {
  return request({
    url: '/article/updateArticleAllowComment',
    method: 'post',
    params: {
      articleId,
      allowComment
    }
  })
}

//更改是否置顶
export function updateArticleTop(articleId, top) {
  return request({
    url: '/article/updateArticleTop',
    method: 'post',
    params: {
      articleId,
      top
    }
  })
}

//删除文章
export function deleteArticle(articleId) {
  return request({
    url: '/article/deleteArticle',
    method: 'delete',
    params: {
      articleId
    }
  })
}